package example.method.p07;

import java.util.ArrayList;
import java.util.Vector;

/**
 * @author 17976
 */
public class Main {
    public static void main(String[] args) {
        Object testObject = new Object();
        displayObject(testObject);
    }

    private static void displayObject(Object o) {
        if(o instanceof Vector){
            System.out.println("对象是 java.util.Vector 类的实例");
        } else if (o instanceof ArrayList) {
            System.out.println("对象是 java.util.ArrayList 类的实例");
        }else{
            System.out.println("对象是 "+o.getClass()+"类的实例");
        }
    }
}
